package cz.zcu.fav.rat.security.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

@Component
public class RegisteredImplementors
{
	static Map<String, LoginImplementor> implementors = new HashMap<String, LoginImplementor>();

	public void addNewImplementor(LoginImplementor implementor)
	{
		implementors.put(implementor.getImplementor(), implementor);
	}

	public static List<String> getImplementors()
	{
		return new ArrayList<String>(implementors.keySet());
	}

	public static boolean isPasswordStoredLocally(String implementorCode)
	{
		return implementors.get(implementorCode).isLocalPasswordRequired();
	}
}
